//
//  Extension+UIImageView.swift
//  SHWeibo
//
//  Created by jingming wang on 16/7/23.
//  Copyright © 2016年 cpy.name. All rights reserved.
//

import UIKit
import SDWebImage

extension UIImageView {
    
    convenience init(imgName:String) {
        self.init(image:UIImage(named: imgName))
    }
    
    // 对SDWebImage 封装
    func sh_setImage(urlString: String?, placeholderImgName: String){
        self.sd_setImageWithURL(NSURL(string: urlString ?? ""), placeholderImage: UIImage(named: placeholderImgName))
    }
}